/**
 * @author light_dust_generator
 * @since 2021-06-23 19:12:53
 */
 <template>
  <qc-page-header @back="goBack"></qc-page-header>
  <a-card :bordered="false" :title="t('org.login-log.loginLogCardTitle')">
    <template #extra>
      <qc-save-button @click="save"></qc-save-button>
    </template>
    <login-log-form ref="loginLogFormRef" :loginLogId="loginLogId"></login-log-form>
  </a-card>
</template>
 <script lang='ts'>
import { defineComponent, reactive, ref, toRefs } from 'vue'
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { loginLogIndexPageUrl } from './interface'
import LoginLogForm from './component/login-log-form.vue'
export default defineComponent({
  components: { LoginLogForm },
  setup() {
    const { t } = useI18n()
    const loginLogFormRef = ref()
    const router = useRouter()
    const formState = reactive({
      loginLogId: router.currentRoute.value.params.id,
      save: () => loginLogFormRef.value.onSubmit(),
      goBack: () => router.push({ path: loginLogIndexPageUrl }),
    })
    return {
      t,
      loginLogFormRef,
      ...toRefs(formState),
    }
  },
})
</script>